package com.gxa.hualian.mapper;

import com.gxa.hualian.pojo.Coupon;
import com.gxa.hualian.pojo.Get;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;
import java.util.List;
import java.util.Map;

/**
 * @Author ChenJin
 * @date 2021/10/13 16:54
 * Description:
 **/
public interface CouponMapper {

    /**
     * 添加优惠券
     * @param coupon
     */
    void insert(Coupon coupon);

    /**
     * 分页获取优惠券列表
     * @param offset
     * @param size
     * @return
     */
    List<Coupon> selectByPage(Integer offset,Integer size);

    List<Map<String,Object>> getCpnUsedList(Timestamp from,Timestamp to, Integer offset, Integer size);

    List<Coupon> selectAll(String name);

    List<Coupon> selectAll2(Map map);

    List<Coupon> getUserNotGetList(String phone);
    List<Coupon> getUserHasGetList(String phone);
    List<Coupon> getOverCpnList(String phone);
}
